/* 保持原有样式基础上增加弹窗区分样式 */
.dialog-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
}

.dialog-wrapper {
    background: white;
    padding: 20px;
    border-radius: 8px;
    width: 500px;
}

.dialog-title {
    font-size: 18px;
    margin-bottom: 20px;
}

.form-item {
    margin-bottom: 15px;
}

/* styles.css 文件内容 */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --background-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--background-gradient);
    min-height: 100vh;
}


/* 基础样式 */
:root {
    --primary-color: #4a90e2;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --background-gradient: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--background-gradient);
    min-height: 100vh;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 操作栏 */
.action-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* 按钮样式 */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(74, 144, 226, 0.4);
}

/* 成员卡片 */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.member-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.3s ease;
}

.member-card:hover {
    transform: translateY(-5px);
}

.member-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-btn {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.delete-btn {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

/* 表单弹窗 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    place-items: center;
    z-index: 1000;
}

.modal {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 1rem;
        padding: 1rem;
    }

    .header h1 {
        font-size: 2rem;
    }
}

.search-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* 控制间距 */
}

.search-input {
    flex: 1;
    /* 自动扩展 */
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
}

.search-btn {
    margin-left: auto;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    background: #4a90e2;
    color: white;
}

/* 新增表单相关样式 */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* 新增必填字段标识 */
.required::after {
    content: "*";
    color: var(--danger-color);
    margin-left: 0.3rem;
}

.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    animation: toastSlide 0.3s ease;
}

@keyframes toastSlide {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}